package com.commonclass.zx;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateConvert {
	public static void main(String[] args) throws ParseException  {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		
		Date date=sdf.parse("2021-11-19 17:50:27");
		String format=sdf.format(date);
		System.out.println(format);
		System.out.println(date);
	}

}
